package com.example.multipleactivities;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.TextView;

public class SecondActivity extends Activity {

	TextView display;
	someModel m2;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_second);
		display = (TextView) findViewById(R.id.textView1);
		
		Intent creator = getIntent();
		m2=(someModel) creator.getSerializableExtra("model");
		//String themessage = creator.getStringExtra("My_Message");
		
		display.setText(m2.message);
		
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.second, menu);
		return true;
	}

}
